﻿using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.Common;
using HumanManagement.BusinessObjects;
using HumanManagement.DataAccess;

namespace HumanManagement.BusinessLogic
{
	public class ProfessionalKnowledgeGraduationGradeBL
	{

		#region ***** Init Methods ***** 
		ProfessionalKnowledgeGraduationGradeDA objProfessionalKnowledgeGraduationGradeDA;
		public ProfessionalKnowledgeGraduationGradeBL()
		{
			objProfessionalKnowledgeGraduationGradeDA = new ProfessionalKnowledgeGraduationGradeDA();
		}
		#endregion

		#region ***** Get Methods ***** 
		/// <summary>
		/// Get ProfessionalKnowledgeGraduationGrade by id
		/// </summary>
		/// <param name="id">ID</param>
		/// <returns>ProfessionalKnowledgeGraduationGrade</returns>
		public ProfessionalKnowledgeGraduationGrade GetByID(int id)
		{
			return objProfessionalKnowledgeGraduationGradeDA.GetByID(id);
		}

		/// <summary>
		/// Get all of ProfessionalKnowledgeGraduationGrade
		/// </summary>
		/// <returns>List<<ProfessionalKnowledgeGraduationGrade>></returns>
		public List<ProfessionalKnowledgeGraduationGrade> GetList()
		{
			string cacheName = "lstProfessionalKnowledgeGraduationGrade";
			if( ServerCache.Get(cacheName) == null )
			{
				ServerCache.Insert(cacheName, objProfessionalKnowledgeGraduationGradeDA.GetList(), "ProfessionalKnowledgeGraduationGrade");
			}
			return (List<ProfessionalKnowledgeGraduationGrade>) ServerCache.Get(cacheName);
		}

		/// <summary>
		/// Get DataSet of ProfessionalKnowledgeGraduationGrade
		/// </summary>
		/// <returns>DataSet</returns>
		public DataSet GetDataSet()
		{
			string cacheName = "dsProfessionalKnowledgeGraduationGrade";
			if( ServerCache.Get(cacheName) == null )
			{
				ServerCache.Insert(cacheName, objProfessionalKnowledgeGraduationGradeDA.GetDataSet(), "ProfessionalKnowledgeGraduationGrade");
			}
			return (DataSet) ServerCache.Get(cacheName);
		}


		/// <summary>
		/// Get all of ProfessionalKnowledgeGraduationGrade paged
		/// </summary>
		/// <param name="recperpage">recperpage</param>
		/// <param name="pageindex">pageindex</param>
		/// <returns>List<<ProfessionalKnowledgeGraduationGrade>></returns>
		public List<ProfessionalKnowledgeGraduationGrade> GetListPaged(int recperpage, int pageindex)
		{
			return objProfessionalKnowledgeGraduationGradeDA.GetListPaged(recperpage, pageindex);
		}

		/// <summary>
		/// Get DataSet of ProfessionalKnowledgeGraduationGrade paged
		/// </summary>
		/// <param name="recperpage">recperpage</param>
		/// <param name="pageindex">pageindex</param>
		/// <returns>DataSet</returns>
		public DataSet GetDataSetPaged(int recperpage, int pageindex)
		{
			return objProfessionalKnowledgeGraduationGradeDA.GetDataSetPaged(recperpage, pageindex);
		}





		#endregion

		#region ***** Add Update Delete Methods ***** 
		/// <summary>
		/// Add a new ProfessionalKnowledgeGraduationGrade within ProfessionalKnowledgeGraduationGrade database table
		/// </summary>
		/// <param name="obj_professionalknowledgegraduationgrade">ProfessionalKnowledgeGraduationGrade</param>
		/// <returns>key of table</returns>
		public int Add(ProfessionalKnowledgeGraduationGrade obj_professionalknowledgegraduationgrade)
		{
			ServerCache.Remove("ProfessionalKnowledgeGraduationGrade", true);
			return objProfessionalKnowledgeGraduationGradeDA.Add(obj_professionalknowledgegraduationgrade);
		}

		/// <summary>
		/// updates the specified ProfessionalKnowledgeGraduationGrade
		/// </summary>
		/// <param name="obj_professionalknowledgegraduationgrade">ProfessionalKnowledgeGraduationGrade</param>
		/// <returns></returns>
		public void Update(ProfessionalKnowledgeGraduationGrade obj_professionalknowledgegraduationgrade)
		{
			ServerCache.Remove("ProfessionalKnowledgeGraduationGrade", true);
			objProfessionalKnowledgeGraduationGradeDA.Update(obj_professionalknowledgegraduationgrade);
		}

		/// <summary>
		/// Delete the specified ProfessionalKnowledgeGraduationGrade
		/// </summary>
		/// <param name="id">ID</param>
		/// <returns></returns>
		public void Delete(int id)
		{
			ServerCache.Remove("ProfessionalKnowledgeGraduationGrade", true);
			objProfessionalKnowledgeGraduationGradeDA.Delete(id);
		}
		#endregion
	}
}
